package com.atguigu.jxc.service;

import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.entity.Goods;
import com.atguigu.jxc.entity.Unit;
import com.atguigu.jxc.vo.GoodsTypeVo;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface GoodsService {


    ServiceVO getCode();


    Map<String, Object> listInventory(Integer page, Integer rows, String codeOrName, Integer goodsTypeId);

    List<GoodsTypeVo> loadGoodsType();

    List<Unit> getUnitList();

    Map<String, Object> listNameAndType(Integer page, Integer rows, String goodsName, Integer goodsTypeId);

    boolean insertType(String goodsTypeName, Integer pId);

    boolean deleteType(Integer goodsTypeId);

    void saveGood(Integer goodsId, Goods good);

    boolean deleteGood(Integer goodsId);

    Map<String, Object> getNoInventoryQuantity(Integer page,Integer rows,String nameOrCode);

    Map<String, Object> getHasInventoryQuantity(Integer page,Integer rows,String nameOrCode);

    boolean saveGoodStock(Integer goodsId, Integer inventoryQuantity, double purchasingPrice);
}
